<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    var r = prompt("请输入圆的半径");
    r = parseFloat(r);
    var c = 2 * Math.PI * r;
    alert("圆的周长为：" + c.toFixed(2));
    var s = Math.PI * r * r;
    alert("圆的面积为：" + s.toFixed(2));
    document.write("圆的周长为：" + c.toFixed(2) + "<br>");
    document.write("圆的面积为：" + s.toFixed(2));
</script>
</script>
</html>